package com.lywz.web.action.admin.city;

import java.util.Collection;

import com.lywz.biz.common.entity.city.CityEntertainment;
import com.lywz.biz.common.enums.City;
import com.lywz.web.struts.GZAbstracterAction;


public class EntertainmentAction extends GZAbstracterAction {
    
    //九个城市的娱乐信息列表
    private Collection<CityEntertainment> entertainmentList;
    //单个城市的娱乐信息
    private CityEntertainment entertainment;
    //数据库自增id
    private int id;
    //还没有添加娱乐信息的城市
    private Collection<City> otherCity;
    
    public String addEntertainment()
    {
        cityInfoService.addEntertainment(entertainment);
        return SUCCESS;
    }
    public String showEntertainmentList()
    {
        entertainmentList = cityInfoService.getEntertainmentList();
        return SUCCESS;   
    }
    public String modifyCityTraffic()
    {
        cityInfoService.modifyEntertainment(entertainment);
        return SUCCESS;
    }
    
    public String toAddEntertainment()
    {
        otherCity = cityInfoService.getUnaddedCity("entertainment");
        return SUCCESS;
    }
    public String toModifyEntertainment(){
        entertainment = cityInfoService.getEntertainmentById(id);
        return SUCCESS;
    }
    
    /************************ setter getter *********************************/
    
    public Collection<CityEntertainment> getEntertainmentList() {
        return entertainmentList;
    }
    
    public void setEntertainmentList(Collection<CityEntertainment> entertainmentList) {
        this.entertainmentList = entertainmentList;
    }
    
    
    public CityEntertainment getEntertainment() {
        return entertainment;
    }


    
    public void setEntertainment(CityEntertainment entertainment) {
        this.entertainment = entertainment;
    }


    
    public int getId() {
        return id;
    }


    
    public void setId(int id) {
        this.id = id;
    }


    
    public Collection<City> getOtherCity() {
        return otherCity;
    }


    
    public void setOtherCity(Collection<City> otherCity) {
        this.otherCity = otherCity;
    }
}
